com.highdeal.notification
Enum NotificationLevel

java.lang.Object
  extended by java.lang.Enum<NotificationLevel>
      extended by com.highdeal.notification.NotificationLevel
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<NotificationLevel>

public enum NotificationLevel
extends java.lang.Enum<NotificationLevel>

This enumeration lists the severity level of a notification: INFORM, SECURITY, ALERT, FAILURE, FATAL, WARN, QUIET.

See Also:
Notification, NotificationDescription

Enum Constant Summary
ALERT
          Level for alerts
FAILURE
          Level for notification informing about a failure that happened in the sending system
FATAL
          Level for notification informing about a fatal event that happened in the sending system
INFORM
          Level for informing notifications
QUIET
          Constant used to configure the sending system so that no notification is generated.
SECURITY
          Level for notifications related to security
WARN
          Level for warning
 
Method Summary
 int getCode()
          Returns the code of this notification level.
static NotificationLevel getFromCode(int code, NotificationLevel defaultValue)
          Searches the notification level object from its code.
 java.lang.String getName()
          Returns the name of this notification level.
static NotificationLevel parse(java.lang.String name, NotificationLevel defaultValue)
          Searches the notification level object from its name.
static NotificationLevel valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static NotificationLevel[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

QUIET

public static final NotificationLevel QUIET
Constant used to configure the sending system so that no notification is generated.


INFORM

public static final NotificationLevel INFORM
Level for informing notifications


SECURITY

public static final NotificationLevel SECURITY
Level for notifications related to security


ALERT

public static final NotificationLevel ALERT
Level for alerts


WARN

public static final NotificationLevel WARN
Level for warning


FAILURE

public static final NotificationLevel FAILURE
Level for notification informing about a failure that happened in the sending system


FATAL

public static final NotificationLevel FATAL
Level for notification informing about a fatal event that happened in the sending system

Method Detail

values

public static NotificationLevel[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (NotificationLevel c : NotificationLevel.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static NotificationLevel valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

parse

public static NotificationLevel parse(java.lang.String name,
                                      NotificationLevel defaultValue)
Searches the notification level object from its name.

Parameters:
name - The name of the notification level to be returned
defaultValue - The notification level object to be returned if there is no notification level with the specified name; Is optional and can be null.
Returns:
The notification level object with the name name if exists, defaultValue otherwise

getFromCode

public static NotificationLevel getFromCode(int code,
                                            NotificationLevel defaultValue)
Searches the notification level object from its code.

Parameters:
code - The code of the notification level object to be returned
defaultValue - The notification level object to be returned if there is no notification level with the specified name; Is optional and can be null.
Returns:
The notification level object with the code code if exists, defaultValue otherwise

getCode

public int getCode()
Returns the code of this notification level.

Returns:
The code

getName

public java.lang.String getName()
Returns the name of this notification level.

Returns:
The name

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)